package com.atguigu.spzx.common.handler.interceptor;

import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * title:
 * author: zgl
 * date: 2024/1/17
 * description：
 */
@Configuration
public class SpzxWebMvcConfig implements WebMvcConfigurer {
    @Resource
    private SpzxAuthInterceptor spzxAuthInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(spzxAuthInterceptor).addPathPatterns("/**/auth/**");
    }
}
